﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>热表批次模板查看</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE;IE=11;IE=8,chrome=1" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/InSiteWebApplication/Content/Easyui/themes/metro/easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/custom-easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/themes/icon.css" rel="stylesheet" />
    <link rel="stylesheet" href="/InSiteWebApplication/Content/webuploader/webuploader.css" />
    <style type="text/css">
       
    </style>
</head>
<body>
    <div>
        <div class="ufcSectionStyle">
            <span class="ufcSectionSpanStyle">批次模板列表</span>
        </div>
        <div style="background: #fff; margin: 3px 0px 3px 3px">
              
            <table id="gdRecordInfo" class="easyui-datagrid" style="width:100%;height:530px"
                   data-options="rownumbers:true,singleSelect:true,striped:true,pagination:false,pageNumber:1,pageSize:5,pageList:[5,10,20],
                   
                    ">
            </table>

        </div>
       
       
        <div id="statusMessage" style="font-size: 14px; height: 40px">
        </div>
        
    </div>
</body>
</html>
<script src="/InSiteWebApplication/Content/Easyui/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/InSiteWebApplication/Content/webuploader/webuploader.js"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.easyui.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/CustomCommon.js" type="text/javascript"></script>
<script  type="text/javascript">

    var page = {
        rootPath: getRootPath(),
        init: function () {
            this.bind();
            this.search();
           
        },
        //页面事件绑定
        bind: function () {
            //列表加载
            $("#gdRecordInfo").datagrid({
                onLoadSuccess: function (data) {

                },
                columns: [[
		         { field: 'PRODUCTNAME', title: '件号', width: 200, editor: 'text' },
                 { field: 'SPECNO', title: '工序号', width: 80, editor: 'text' },
                 { field: 'FILENAME', title: '文件名', width: 200, editor: 'text' },
                 { field: 'FILEPATH', title: '查看', width: 100,
                     formatter: function (value, row, index) {
                         if (value != "" && value != null) {
                             return "<a href='" + page.rootPath + "/" + value + "' target='_blank'>查看</a>"
                         }
                     }
                 },
                 { field: 'RBCONTAINERTEMPLATEID', hidden: true }
	             ]]
            });
        },
        //查询
        search: function () {
            var gridID = "#gdRecordInfo";
            var formData = {};
            formData.action = "GetPageList";
            formData.pageSize = 100000;
            formData.pageNumber = 1;
            formData.productNo = getParam('product');
            formData.SpecNos = getParam('SpecNos');
            formData.productNos = getParam('productNos');
            $.ajax({
                type: "Post",
                url: page.rootPath + "/Ashx/ReBiaoConainer/ReBiaoContainerUploadHandler.ashx",
                data: formData,
                cashe: false,
                success: function (data) {
                    $(gridID).datagrid('loaded');
                    var result = JSON.parse(data);
                    //给分页对象赋值
                    $(gridID).datagrid('loadData', { total: result.TotalCount, rows: result.Data });
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(XMLHttpRequest.responseText);
                }
            });
        }
    }

    page.init();
</script>
